#include "timenow.h"
#include "ui_timenow.h"
#include<QDebug>
TimeNow::TimeNow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::TimeNow)
{
    ui->setupUi(this);
    QTimer *timer = new QTimer(this);
    connect(timer,SIGNAL(timeout()),this,SLOT(timerUpdate()));
    timer->start(1000);
}

TimeNow::~TimeNow()
{
    delete ui;
}

//void TimeNow::showself()
//{
//    emit signatnW();
//   this->show();
//}

 const QString &TimeNow::gettime() const
 {
     emit signagettime();
     qDebug()<<m_str;
     return m_str;
 }
void TimeNow::timerUpdate()
{
 QDateTime time = QDateTime::currentDateTime();
  m_str = time.toString("yyyyMMddhh");
 qDebug()<<m_str;
// ui->label_time->setText(str);
}

